﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RegisterCodeGenerator
{
    public class BitMask
    {
        public string Name { get; set; }
        public String[] Bit { get; set; }
        public string DefaultValue { get; set; }
        public bool IsMultiByte { get; set; }
        public bool CanRead { get; set; }
        public bool CanWrite { get; set; }
        public BitMask(string[] items)
        {
            Name = items[1];
            Bit = items[2].Split(':');
            DefaultValue = items[3];
            CanRead = items[4].Contains("R");
            CanWrite = items[4].Contains("W");
            IsMultiByte = Bit.Length > 1;
        }
    }
}
